package model

import (
	"gorm.io/gorm"
	"time"
)

type Pack struct {
	Id         uint           `gorm:"column:id;type:bigint UNSIGNED;primaryKey;not null;" json:"id"`
	FormUserid uint           `gorm:"column:form_userId;type:bigint;not null;" json:"form_userId"`
	PackagesId string         `gorm:"column:packages_id;type:varchar(36);not null;" json:"packages_id"`
	Weight     float64        `gorm:"column:weight;type:double;not null;" json:"weight"`
	Address    string         `gorm:"column:address;type:varchar(100);not null;" json:"address"`
	Urgent     string         `gorm:"column:urgent;type:varchar(15);not null;" json:"urgent"`
	CreatedAt  time.Time      `gorm:"column:created_at;type:datetime(3);not null;default:CURRENT_TIMESTAMP(3);" json:"created_at"`
	UpdateAt   time.Time      `gorm:"column:update_at;type:datetime(3);not null;default:CURRENT_TIMESTAMP(3);" json:"update_at"`
	DeleteAt   gorm.DeletedAt `gorm:"column:delete_at;type:datetime(3);default:NULL;" json:"delete_at"`
}

func (p *Pack) TableName() string {
	return "pack"
}
